package com.cwl.pattern.装饰模式;

/**
 * @program: pattern
 * @description: 测试用例
 * @author: ChenWenLong
 * @create: 2019-06-25 17:38
 **/
public class DecoratorTest {

    public static void main(String[] args) {
        ConcreteComponent component =new ConcreteComponent();
        ConcreteDecoratorA decoratorA =new ConcreteDecoratorA();
        ConcreteDecoratorB decoratorB =new ConcreteDecoratorB();
        decoratorA.setComponent(component);
        decoratorB.setComponent(decoratorA);
        decoratorB.opeartion();
    }
}
